<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Util::SOSO_Util_Pagination</title>
<link href="../../css/ea.css" rel="stylesheet" type="text/css" />
<script>
function initPage(src) {
	if(parent==this&&(this.location+"").indexOf('EARoot')!=-1)
		document.location=(this.location+"").substring(0,(this.location+"").indexOf('EARoot'))+"index"+(this.location+"").substring((this.location+"").lastIndexOf('.'))+"?goto="+((this.location+"").substring((this.location+"").indexOf('EARoot')+7,(this.location+"").lastIndexOf('.')).replace(/\//g,':').replace(/EA/g,""));
	else
		parent.initPage(src);
}
</script>
</head>
<body onload="initPage(this);" class="Content">
<div class="pageHeader"></div>
<div class="PageBody">
	<span class="ObjectTitle">SOSO_Util_Pagination  : public   class</span>
	<table border="0" cellpadding="0" cellspacing="0" class="ObjectDetails">
		<tr>
			<td width="15%" class="ObjectDetailsTopic">Created:</td>
			<td width="85%" class="ObjectDetailsValue">2009-7-22 11:03:49</td>
		</tr>
		<tr>
			<td class="ObjectDetailsTopic">Modified:</td>
			<td class="ObjectDetailsValue">2009-7-22 11:03:49</td>
		</tr>
		<tr style="height: 10px"><td colspan="2"></td></tr>
		<tr>
			<td class="ObjectDetailsTopic"><img src="../../images/plus03.gif" align="absmiddle" id="proj" onclick="parent.toggleData(this.id)" />Project:</td>
			<td class="ObjectDetailsValue"></td>
		</tr>
		<tr id="proj00" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Author:</td>
			<td class="ObjectDetailsValue">phper <MSN:zhanghe525@hotmail.com></td>
		</tr>
		<tr id="proj01" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Version:</td>
			<td class="ObjectDetailsValue">1.0 alpha 2006-03-02</td>
		</tr>
		<tr id="proj02" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Phase:</td>
			<td class="ObjectDetailsValue">1.0</td>
		</tr>
		<tr id="proj03" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Status:</td>
			<td class="ObjectDetailsValue">Proposed</td>
		</tr>
		<tr id="proj04" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Complexity:</td>
			<td class="ObjectDetailsValue">Easy</td>
		</tr>
		<tr>
			<td class="ObjectDetailsTopic"><img src="../../images/plus03.gif" align="absmiddle" id="adv" onclick="parent.toggleData(this.id)" />Advanced:</td>
			<td class="ObjectDetailsValue"></td>
		</tr>
		<tr id="adv00" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">UUID:</td>
			<td class="ObjectDetailsValue">{A215017D-5CFB-4fc9-A3D0-9FBE3E166379}</td>
		</tr>
		<tr id="adv01" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Appears In:</td>
			<td class="ObjectDetailsValue"><a href="EA206.htm">Util</a></td>
		</tr>
	</table>
	<div class="ObjectDetailsNotes">SOSO Framework <br />@category   SOSO_Util<br />@package    SOSO_Util<br />@description 工具类::分页程序<br />@copyright  Copyright (c) 2007-2008 Soso.com<br /></div>

	<div class="TableGroup" id="TableGroup">
		<ul class="ItemTitle">
			<li onClick="parent.toggleItem('Attributes');" id="AttributesTitle">Attributes</li>
			<li onClick="parent.toggleItem('Operations');" id="OperationsTitle">Operations</li>
		</ul>
<div class="ItemBody" id="AttributesTable">
	<table border="0" cellspacing="0" cellpadding="0" class="Table">
		<tr>
			<td width="40%" class="TableHeading">Attribute</td>
			<td width="60%" class="TableHeading">Details</td>
		</tr>
						<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mCurrentPage</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			当前页数&lt;br /&gt;@var integer
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mLength</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> 9<br></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			最多显示数字个数&lt;br /&gt;@var integer
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mLink</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> "<a href='%s'>%s</a>&nbsp;"<br></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			默认链接
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mNextPage</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			下一页&lt;br /&gt;@var integer
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mPage</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			生成的分页链接 &lt;br /&gt;@var unknown_type
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mPagesize</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i>&nbsp;</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mParam</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			参数名称 &lt;br /&gt;@var string
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mPrePage</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			前一页&lt;br /&gt;@var integer
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mStyle</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> array('none','normal','normal'=>'normal','none'=>'none')<br></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			分页样式&lt;br /&gt;@var array
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mTotal</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			总页数&lt;br /&gt;@var integer
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mTotalResult</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			记录总数&lt;br /&gt;@var integar
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;showFirst</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> true<br></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			是否显示 [最前页],[最后页] 开关,true为显示&lt;br /&gt;@var boolean
		</td>
	</tr>
</table></div>
</td>
			</tr>
		</table>
</div><div class="ItemBody" id="OperationsTable">
	<table border="0" cellspacing="0" cellpadding="0" class="Table">
		<tr>
			<td width="40%" class="TableHeading">Operation</td>
			<td width="60%" class="TableHeading">Details</td>
		</tr>
						<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>__construct</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{D456EF7B-C27D-4f71-A368-FB63E7AA670F}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{D456EF7B-C27D-4f71-A368-FB63E7AA670F}" border="0" />pPageNo: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{D456EF7B-C27D-4f71-A368-FB63E7AA670F}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td>1</td>
						</tr>
						<tr id="param{D456EF7B-C27D-4f71-A368-FB63E7AA670F}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{D456EF7B-C27D-4f71-A368-FB63E7AA670F}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{D456EF7B-C27D-4f71-A368-FB63E7AA670F}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{44052B89-8911-436d-9B62-F62001271BD5}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{44052B89-8911-436d-9B62-F62001271BD5}" border="0" />pPageSize: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{44052B89-8911-436d-9B62-F62001271BD5}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td>30</td>
						</tr>
						<tr id="param{44052B89-8911-436d-9B62-F62001271BD5}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{44052B89-8911-436d-9B62-F62001271BD5}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{44052B89-8911-436d-9B62-F62001271BD5}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{B181CDD8-B38E-49e4-97E9-A8B4CB1F53B5}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{B181CDD8-B38E-49e4-97E9-A8B4CB1F53B5}" border="0" />total: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{B181CDD8-B38E-49e4-97E9-A8B4CB1F53B5}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{B181CDD8-B38E-49e4-97E9-A8B4CB1F53B5}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{B181CDD8-B38E-49e4-97E9-A8B4CB1F53B5}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{B181CDD8-B38E-49e4-97E9-A8B4CB1F53B5}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{55819199-2D11-425f-BD85-CB7CBF0156F6}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{55819199-2D11-425f-BD85-CB7CBF0156F6}" border="0" />getPage: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{55819199-2D11-425f-BD85-CB7CBF0156F6}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td>false</td>
						</tr>
						<tr id="param{55819199-2D11-425f-BD85-CB7CBF0156F6}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{55819199-2D11-425f-BD85-CB7CBF0156F6}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{55819199-2D11-425f-BD85-CB7CBF0156F6}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{B048E008-D418-4be7-8A99-22DBA101C527}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{B048E008-D418-4be7-8A99-22DBA101C527}" border="0" />pStype: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{B048E008-D418-4be7-8A99-22DBA101C527}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td>0</td>
						</tr>
						<tr id="param{B048E008-D418-4be7-8A99-22DBA101C527}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{B048E008-D418-4be7-8A99-22DBA101C527}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{B048E008-D418-4be7-8A99-22DBA101C527}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{E3514D89-C685-46e8-9AA5-6ADB5088DBDD}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{E3514D89-C685-46e8-9AA5-6ADB5088DBDD}" border="0" />pParamName: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{E3514D89-C685-46e8-9AA5-6ADB5088DBDD}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td>'page'</td>
						</tr>
						<tr id="param{E3514D89-C685-46e8-9AA5-6ADB5088DBDD}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{E3514D89-C685-46e8-9AA5-6ADB5088DBDD}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{E3514D89-C685-46e8-9AA5-6ADB5088DBDD}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			构造函数，初始化参数 &lt;br /&gt;@param integer $pPageNo     //当前页码&lt;br /&gt;@param integer $pPageSize   //页尺寸&lt;br /&gt;@param integer $total的     //总记录数&lt;br /&gt;@param string  $psType      //分页样式
		</td>
	</tr>
</table></div>

				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>getPage</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{01CE3F1B-2BF9-4e4b-BADF-0BD40132CF14}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{01CE3F1B-2BF9-4e4b-BADF-0BD40132CF14}" border="0" />pStyle: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{01CE3F1B-2BF9-4e4b-BADF-0BD40132CF14}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td>'none'</td>
						</tr>
						<tr id="param{01CE3F1B-2BF9-4e4b-BADF-0BD40132CF14}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{01CE3F1B-2BF9-4e4b-BADF-0BD40132CF14}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{01CE3F1B-2BF9-4e4b-BADF-0BD40132CF14}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{0F490452-643E-4b3a-A6A5-A28B75DB0DC9}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{0F490452-643E-4b3a-A6A5-A28B75DB0DC9}" border="0" />pScript: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{0F490452-643E-4b3a-A6A5-A28B75DB0DC9}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td>''</td>
						</tr>
						<tr id="param{0F490452-643E-4b3a-A6A5-A28B75DB0DC9}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{0F490452-643E-4b3a-A6A5-A28B75DB0DC9}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{0F490452-643E-4b3a-A6A5-A28B75DB0DC9}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			生成分页效果,兼容Javascript，可传JS给$pScript变量 例如：$this-&gt;getPage(&quot;none&quot;,&quot;alert(%d)&quot;); 结果:&lt;a href=javascript:viewPage(1)&gt;上一页&lt;/a&gt; &lt;a href=javascript:alert(2)&gt;上一页&lt;/a&gt; e.g:可传相对复杂的JS进来，本方法只对%d作数字替换 (未完善，暂不推荐使用) 分页样式:none   : 上一页 下一页 normal : 最前页 上一页 1 2 3 4 5 6 7 8 9 下一页 最后页&lt;br /&gt;@param string $pStyle none:normal
		</td>
	</tr>
</table></div>

				</td>
			</tr>

		</table>
</div>	</div>
<div class="pageFooter"></div>
 
</body>
</html>